package com.outfoodmanage.common;

/**
 * @Author huisonglin
 * @Description
 * @PackageName intelligent-vehicle-platform
 * @Package com.intelligent.common
 * @Date 2023/7/20 16:45
 * @Version 1.0
 */
public class CurrentUser {

    private  static ThreadLocal<Long> user = new ThreadLocal<>();

    public static void setUserId(Long userId){
       user.set(userId);
    }

    public static Long getUserId(){
        return user.get();
    }

    public static void  remove(){
        user.remove();
    }

}
